<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-category_id" data-rule="" class="form-control selectpicker" multiple="" name="row[category_id]">
                {foreach name="categories" item="vo"}
                <option value="{$vo->id}" >{$vo->title}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否指定服务')}:</label>
        <div class="col-xs-12 col-sm-8">

            <label class="am-radio">
                <input type="radio" name="row[service]" value="0" data-am-ucheck checked>
                无限制
            </label>
            <label class="am-radio">
                <input type="radio" name="row[service]" value="1" data-am-ucheck>
                指定服务
            </label>
            <select  id="c-service_id" data-rule="" class="form-control selectpicker" multiple="" name="row[service_id]">
                {foreach name="services" item="vo"}
                <option value="{$vo->id}">{$vo->service_name}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Money')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money" class="form-control" step="0.01" name="row[money]" type="number" min="0" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Line_money')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-line_money" class="form-control" step="0.01" name="row[line_money]" type="number" min="0" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="typeList" item="vo"}
                <label for="row[type]-{$key}"><input id="row[type]-{$key}" class="radio-type" name="row[type]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>
            <small style="display: inline-block; margin-top: 5px; color: red">注：体验券不用设置优惠金额，默认为划线价格</small>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('使用门槛')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="am-radio">
                <input id="c-need_amount_0" type="radio" name="row[need_amount]" value="0" data-am-ucheck checked> 无门槛
            </label>
            <label class="am-radio am-margin-top">
                <input id="c-need_amount_1" type="radio" class="am-radio-inline" > 满
                <input id="c-need_amount_3" type="number" name="row[need_amount]" class="am-radio-inline" min="0" value="0"> 元
            </label>
        </div>
    </div>
    <div class="form-group discount-type">
        <label class="control-label col-xs-12 col-sm-2">{:__('优惠方式')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="am-radio-inline">
                <input id="c-discount-typ-1" type="radio" name="row[discount_type]" value="1" data-am-ucheck checked> 优惠金额
            </label>
            <div class="am-input-group">
                <span class="am-input-group-label am-input-group-label__center">减</span>
                <input id="c-discount_amount_1" type="number" class="am-form-field" name="row[discount_amount]" min="0" value="0" required>
            </div>
            <label class="am-radio-inline am-margin-top">
                <input id="c-discount-type-2" type="radio" name="row[discount_type]" value="2" > 折扣
            </label>
            <div class="am-input-group">
                <span class="am-input-group-label am-input-group-label__left">尊享</span>
                <input id="c-discount" type="number" name="row[discount]" class="am-form-field" min="0" max="10" value="0">
                <span class="am-input-group-label am-input-group-label__right">折</span>
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Expired_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="am-radio-inline">
                <input id="c-expired_type_1" type="radio" name="row[expired_type]" value="1" data-am-ucheck checked> 开始结束时间
            </label>
            <div class="am-input-group">
                <input id="c-start_time" class="form-control am-form-field datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text"
                       placeholder="开始时间" >
                <span class="am-input-group-label am-input-group-label__center">至</span>
                <input id="c-end_time" class="form-control am-form-field datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text"
                       placeholder="结束时间" >
            </div>
            <label class="am-radio-inline am-margin-top">
                <input id="c-expired_type_2" type="radio" name="row[expired_type]" value="2"> 领取N天
            </label>
            <div class="am-input-group">
                <span class="am-input-group-label am-input-group-label__left">领取</span>
                <input id="c-expiry_date" type="number" name="row[expiry_date]" class="am-form-field" min="0" value="0">
                <span class="am-input-group-label am-input-group-label__right">天后过期</span>
            </div>
        </div>
    </div>

    <div class="form-group" hidden>
        <label class="control-label col-xs-12 col-sm-2">{:__('优惠券数量')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-num" data-rule="required" class="form-control" name="row[num]" type="number" min="1" value="1">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('会员专享')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="checkbox">-->
<!--                {foreach name="vipList" item="vo"}-->
<!--                <label for="row[vip]-{$key}"><input id="row[vip]-{$key}" name="row[vip][]" type="checkbox" value="{$vo->id}" /> {$vo->name}</label>-->
<!--                {/foreach}-->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Buy_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-buy_num" data-rule="required" class="form-control" name="row[buy_num]" type="number" min="0" value="0">
            <small style="display: inline-block; margin-top: 5px;">注：0表示无限制数量</small>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Stock_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-stock_num" data-rule="required" class="form-control" name="row[stock_num]" type="number" min="0" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Online')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="onlineList" item="vo"}
                <label for="row[online]-{$key}"><input id="row[online]-{$key}" name="row[online]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-description" class="form-control " rows="5" name="row[description]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Notes')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-notes" class="form-control " rows="5" name="row[notes]" cols="50"></textarea>
            <small style="display: inline-block; margin-top: 5px;">注：多条之间需要换行时，请每条的后面加上 & 符号，最后一条不需要</small>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script>
    console.log(1111)
</script>